#!perl
################################################################################
# WeBWorK Online Homework Delivery System
# Copyright &copy; 2000-2018 The WeBWorK Project, http://openwebwork.sf.net/
# $CVSHeader: webwork2/conf/defaults.config,v 1.225 2010/05/18 18:03:31 apizer Exp $
# 
# This program is free software; you can redistribute it and/or modify it under
# the terms of either: (a) the GNU General Public License as published by the
# Free Software Foundation; either version 2, or (at your option) any later
# version, or (b) the "Artistic License" which comes with this package.
# 
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE.  See either the GNU General Public License or the
# Artistic License for more details.
################################################################################

# This file is used to set up the default WeBWorK course environment for all
# requests. Values may be overwritten by the course.conf for a specific course.
# All package variables set in this file are added to the course environment.
# If you wish to set a variable here but omit it from the course environment,
# use the "my" keyword. The $webwork_dir variable is set in the WeBWorK Apache
# configuration file (webwork.apache-config) and is available for use here. In
# addition, the $courseName variable holds the name of the current course.

# YOU SHOULD NOT NEED TO EDIT THIS FILE!!
# All site-specific settings such as file locations and web addresses are
# configured in site.conf.  If you want to override any settings in this
# file, you can put a directive in localOverrides.conf.

include("conf/site.conf");
include("VERSION");  # get WW version  
# The version of PG is now obtained from the file pg/VERSION
# using code added to CourseEnvironment.pm  
# with this one exception include can only read files under the webwork2 directory 

################################################################################
# site.conf  should contain basic information about directories and URLs on
# your server
################################################################################

################################################################################
# Mail Settings
################################################################################



# AllowedRecipients defines addresses that the PG system is allowed to send mail
# to. this prevents subtle PG exploits. This should be set in course.conf to the
# addresses of professors of each course. Sending mail from the PG system (i.e.
# questionaires, essay questions) will fail if this is not set somewhere (either
# here or in course.conf).
$mail{allowedRecipients}     = [
	#'prof1@yourserver.yourdomain.edu',
	#'prof2@yourserver.yourdomain.edu',
];

# By default, feeback is sent to all users who have permission to
# receive_feedback. If this list is non-empty, feedback is also sent to the
# addresses specified here.
# 
# * If you want to disable feedback altogether, leave this empty and set
#   submit_feeback => $nobody in %permissionLevels below. This will cause the
#   feedback button to go away as well.
# 
# * If you want to send email ONLY to addresses in this list, set
#   receive_feedback => $nobody in %permissionLevels below.
# 
# It's often useful to set this in the course.conf to change the behavior of
# feedback for a specific course.
# 
# Items in this list may be bare addresses, or RFC822 mailboxes, like:
#   'Joe User <joe.user@example.com>'
# The advantage of this form is that the resulting email will include the name
# of the recipient in the "To" field of the email.
# 
$mail{feedbackRecipients}    = [
	#'prof1@yourserver.yourdomain.edu',
	#'prof2@yourserver.yourdomain.edu',
];

# Feedback subject line -- the following escape sequences are recognized:
# 
#   %c = course ID
#   %u = user ID
#   %s = set ID
#   %p = problem ID
#   %x = section
#   %r = recitation
#   %% = literal percent sign
# 

$mail{feedbackSubjectFormat} = "[WWfeedback] course:%c user:%u set:%s prob:%p sec:%x rec:%r";

# feedbackVerbosity:
#  0: send only the feedback comment and context link
#  1: as in 0, plus user, set, problem, and PG data
#  2: as in 1, plus the problem environment (debugging data)
$mail{feedbackVerbosity}     = 1;

# Defines the size of the Mail Merge editor window
# FIXME: should this be here? it's UI, not mail
# FIXME: replace this with the auto-size method that TWiki uses
$mail{editor_window_rows}    = 15;
$mail{editor_window_columns} = 100;

##################################################################################
# Customizing the action of the "Email your instructor" button
##################################################################################

# Customizing the behavior for this button is best done by copying the lines below, entering them
# in the localOverrides.conf file and making the desired modifications. 
# Then you will not need to update these modifications
# when you download a new version of WeBWorK.

# Use this to customize the text of the feedback button.
$feedback_button_name = "Email instructor";

# If this value is true, feedback will only be sent to users with the same
# section as the user initiating the feedback.
$feedback_by_section = 0;

# If the variable below is set to a non-empty value (i.e. in course.conf), WeBWorK's usual
# email feedback mechanism  will be replaced with a link to the given URL.
# See also $feedback_button_name, above.

$courseURLs{feedbackURL} = "";

# If the variable below is set to a non-empty value (i.e. in course.conf), 
# WeBWorK's usual email feedback mechanism  will be replaced with a link to the given URL and
# a POST request with information about the problem including the HTML rendering
# of the problem will be sent to that URL.
# See also $feedback_button_name, above.

#$courseURLs{feedbackFormURL} = "http://www.mathnerds.com/MathNerds/mmn/SDS/askQuestion.aspx";  #"http://www.tipjar.com/cgi-bin/test";
$courseURLs{feedbackFormURL} = "";

################################################################################
# Repository Information
################################################################################ This is where you put your remote and branch for your WeBWorK, PG and OPL
# github repositories.  

$enableGitUpgradeNotifier = 1;

$gitWeBWorKRemoteName = "origin";
$gitWeBWorKBranchName = "master";
$gitPGRemoteName = "origin";
$gitPGBranchName = "master";
$gitLibraryRemoteName = "origin";
$gitLibraryBranchName = "master";

################################################################################
# Theme
################################################################################

$defaultTheme = "math4";
$defaultThemeTemplate = "system";

################################################################################
# Hardcopy Theme
################################################################################

# Available Hardcopy themes (located in snippets)
$hardcopyThemes = [qw(oneColumn twoColumn)];
# Hardcopy theme names (pretty names for themes)
$hardcopyThemeNames = {oneColumn => 'One Column',
		       twoColumn => 'Two Columns'};
# Default Hardcopy them
$hardcopyTheme = "twoColumn";

################################################################################
# Achievements
################################################################################
$achievementsEnabled = 0;
$achievementPointsPerProblem = 5;
$achievementPreambleFile = "preamble.at";

################################################################################
# Achievements
################################################################################
$showCourseHomeworkTotals = 1;

################################################################################
# Editor
################################################################################
$editor{author} = '';
$editor{authorInstitute} = '';
$editor{textTitle} = '';
$editor{textEdition} = '';
$editor{textAuthor} = '';

################################################################################
# showMeAnother
################################################################################
# switch to enable showMeAnother button
$pg{options}{enableShowMeAnother} = 0;
# default number of attempts before enabling show me another
$pg{options}{showMeAnotherDefault} = -1;
# maximum number of times (per problem) the button can be used
$pg{options}{showMeAnotherMaxReps} = 3;
# maximum number of attempts to check if changing the problem seed
# changes the problem
$pg{options}{showMeAnotherGeneratesDifferentProblem} = 5;
# showMeAnother options
$pg{options}{showMeAnother}=[
"SMAcheckAnswers",
"SMAshowSolutions",
"SMAshowCorrect",
"SMAshowHints",
];

###############################################################################
# periodicRandomization
################################################################################
# switch to enable periodic re-randomization
$pg{options}{enablePeriodicRandomization} = 0;
# course-wide default period for re-randomization, should be an integer
# the value of 0 disables re-randomization
$pg{options}{periodicRandomizationPeriod} = 5;

################################################################################
# Language
################################################################################

$language = "en";   # tr = turkish,  en=english

# $perProblemLangAndDirSettingMode controls how and whether LANG and/or DIR
#    attributes are added to the DIV element enveloping a problem
#    which helps handle proper display of problems with a text direction
#    different from that used course-wide. Ex: enables English problems to
#    be displayed properly in a Hebrew course site, which helps select problems
#    to be translated to Hebrew.
$perProblemLangAndDirSettingMode = "force::ltr";

################################################################################
# System-wide locations (directories and URLs)
################################################################################

# The root directory, set by webwork_root variable in Apache configuration.
$webworkDirs{root}          = "$webwork_dir";

# Location of system-wide data files.
$webworkDirs{DATA}          = "$webworkDirs{root}/DATA";

# Used for temporary storage of uploaded files.
$webworkDirs{uploadCache}   = "$webworkDirs{DATA}/uploads";

# Location of utility programs.
$webworkDirs{bin}           = "$webworkDirs{root}/bin";

# Location of configuration files, templates, snippets, etc.
$webworkDirs{conf}          = "$webworkDirs{root}/conf";


# Location of course directories.
$webworkDirs{courses}       = "$webwork_courses_dir" || "$webworkDirs{root}/courses";

# Contains log files.
$webworkDirs{logs}          = "$webworkDirs{root}/logs";

# Contains non-web-accessible temporary files, such as TeX working directories.
$webworkDirs{tmp}           = "$webworkDirs{root}/tmp";

# The (absolute) destinations of symbolic links that are OK for the FileManager to follow.
#   (any subdirectory of these is a valid target for a symbolic link.)
# For example:
#    $webworkDirs{valid_symlinks} = ["$webworkDirs{courses}/modelCourse/templates","/ww2/common/sets"];
$webworkDirs{valid_symlinks}   = [];

################################################################################
##### The following locations are web-accessible.
################################################################################

# The root URL (usually /webwork2), set by <Location> in Apache configuration.
$webworkURLs{root}          = "$webwork_url";

# Location of system-wide web-accessible files, such as equation images, and
# help files.
$webworkDirs{htdocs}        = "$webwork_htdocs_dir" || "$webworkDirs{root}/htdocs";
$webworkURLs{htdocs}        = "$webwork_htdocs_url";

# Location of web-accessible temporary files, such as equation images.
# These two should be set in localOverrides.conf -- not here since this can be overwritten by new versions.
$webworkDirs{htdocs_temp}   = "$webworkDirs{htdocs}/tmp";
$webworkURLs{htdocs_temp}   = "$webworkURLs{htdocs}/tmp";

# Location of cached equation images.
$webworkDirs{equationCache} = "$webworkDirs{htdocs_temp}/equations";
$webworkURLs{equationCache} = "$webworkURLs{htdocs_temp}/equations";

# Contains context-sensitive help files.
$webworkDirs{local_help}    = "$webworkDirs{htdocs}/helpFiles";
$webworkURLs{local_help}    = "$webworkURLs{htdocs}/helpFiles";

# Location of theme templates.
$webworkDirs{themes}     = "$webworkDirs{htdocs}/themes";

# Location of localization directory.
$webworkDirs{localize} = "$webworkDirs{root}/lib/WeBWorK/Localize";

# URL of general WeBWorK documentation.
$webworkURLs{docs}          = "http://webwork.maa.org";

# URL of WeBWorK Bugzilla database.
$webworkURLs{bugReporter}   = "http://bugs.webwork.maa.org/enter_bug.cgi";

#URL for help buttons on the PGProblemEditor pages:
$webworkURLs{problemTechniquesHelpURL}='http://webwork.maa.org/wiki/Category:Problem_Techniques';
$webworkURLs{MathObjectsHelpURL}      ='http://webwork.maa.org/wiki/Category:MathObjects';
$webworkURLs{PODHelpURL}              ='https://demo.webwork.rochester.edu/wwdocs/';
$webworkURLs{PGLabHelpURL}            ='https://demo.webwork.rochester.edu/webwork2/wikiExamples/MathObjectsLabs2/2/?login_practice_user=true';  
$webworkURLs{PGMLHelpURL}             ='https://courses1.webwork.maa.org/webwork2/cervone_course/PGML/1/?login_practice_user=true';
$webworkURLs{AuthorHelpURL}           ='http://webwork.maa.org/wiki/Category:Authors';
  
# Location of CSS
# $webworkURLs{stylesheet}    = "$webworkURLs{htdocs}/css/${defaultTheme}.css";
# this is never used -- changing the theme from the config panel
# doesn't appear to reset the theme in time?
# It's better to refer directly to the .css file in the system.template
# <link rel="stylesheet" type="text/css" href="<!--#url type="webwork" name="htdocs"-->/css/math.css"/>

# Location of MathJax script, used for the MathJax display mode.
$webworkURLs{MathJax}       = "$webworkURLs{htdocs}/mathjax/MathJax.js?config=TeX-MML-AM_HTMLorMML-full";

# Location of Tabber script, used to generate tabbed widgets.
$webworkURLs{tabber}		= "$webworkURLs{htdocs}/js/legacy/vendor/tabber.js";

################################################################################
# Defaults for course-specific locations (directories and URLs)
################################################################################

# The root directory of the current course. (The ID of the current course is
# available in $courseName.)
$courseDirs{root}        = "$webworkDirs{courses}/$courseName";

# Location of course-specific data files.
$courseDirs{DATA}        = "$courseDirs{root}/DATA";

# Location of course HTML files, passed to PG.
$courseDirs{html}        = "$courseDirs{root}/html";
$courseURLs{html}        = "$webwork_courses_url/$courseName";

# Location of course image files, passed to PG.
$courseDirs{html_images} = "$courseDirs{html}/images";

# Location of web-accessible, course-specific temporary files, like static and
# dynamically-generated PG graphics.
$courseDirs{html_temp}   = "$webworkDirs{htdocs_temp}/$courseName";
$courseURLs{html_temp}   = "$webworkURLs{htdocs_temp}/$courseName";

# Location of course-specific logs, like the transaction log.
$courseDirs{logs}        = "$courseDirs{root}/logs";

# Location of scoring files.
$courseDirs{scoring}     = "$courseDirs{root}/scoring";

# Location of PG templates and set definition files.
$courseDirs{templates}   = "$courseDirs{root}/templates";

# Location of course achievement files.
$courseDirs{achievements}   = "$courseDirs{templates}/achievements";
$courseDirs{achievements_html} = "$courseDirs{html}/achievements"; #contains badge icons
$courseURLs{achievements}   = "$courseURLs{html}/achievements";

# Location of course-specific macro files.
$courseDirs{macros}      = "$courseDirs{templates}/macros";

# Location of mail-merge templates.
$courseDirs{email}       = "$courseDirs{templates}/email";

# Location of temporary editing files.
$courseDirs{tmpEditFileDir}  = "$courseDirs{templates}/tmpEdit";

# mail merge status directory
$courseDirs{mailmerge}   = "$courseDirs{DATA}/mailmerge";

################################################################################
# System-wide files
################################################################################

# Location of this file.
$webworkFiles{environment}                      = "$webworkDirs{conf}/defaults.conf";

# Flat-file database used to protect against MD5 hash collisions. TeX equations
# are hashed to determine the name of the image file. There is a tiny chance of
# a collision between two TeX strings. This file allows for that. However, this
# is slow, so most people chose not to worry about it. Set this to "" if you
# don't want to use the equation cache file.
$webworkFiles{equationCacheDB}                  = ""; # "$webworkDirs{DATA}/equationcache";

################################################################################
# Hardcopy snippets are used in constructing a TeX file for hardcopy output.
# They should contain TeX code unless otherwise noted.
################################################################################

# The setHeader preceeds each set in hardcopy output. It is a PG file.
# This is the default file which is used if a specific files is not selected
$webworkFiles{hardcopySnippets}{setHeader}      = "$webworkDirs{conf}/snippets/setHeader.pg";  # hardcopySetHeader.pg",
#$webworkFiles{hardcopySnippets}{setHeader}     = "$courseDirs{templates}/ASimpleHardCopyHeaderFile.pg"; # An alternate default header file

################################################################################
# In general the following files are determined by which hardcopy theme you
# are using however you can set these variables to override the theme settings. 
# Note:  These overrides are perminant across all themes.  
################################################################################

# The preamble is the first thing in the TeX file.
#$webworkFiles{hardcopySnippets}{preamble}       = "$webworkDirs{conf}/snippets/hardcopyPreamble.tex";

# The problem divider goes between problems.
#$webworkFiles{hardcopySnippets}{problemDivider} = "$webworkDirs{conf}/snippets/hardcopyProblemDivider.tex";

# The set footer goes after each set. Is is a PG file.
#$webworkFiles{hardcopySnippets}{setFooter}      = "$webworkDirs{conf}/snippets/hardcopySetFooter.pg";

# The set divider goes between sets (in multiset output).
#$webworkFiles{hardcopySnippets}{setDivider}     = "$webworkDirs{conf}/snippets/hardcopySetDivider.tex";

# The user divider does between users (in multiuser output).
#$webworkFiles{hardcopySnippets}{userDivider}    = "$webworkDirs{conf}/snippets/hardcopyUserDivider.tex";

# The postamble is the last thing in the TeX file.
#$webworkFiles{hardcopySnippets}{postamble}      = "$webworkDirs{conf}/snippets/hardcopyPostamble.tex";

################################################################################
##### Screen snippets are used when displaying problem sets on the screen.
################################################################################

# The set header is displayed on the problem set page. It is a PG file.
# This is the default file which is used if a specific files is not selected
#$webworkFiles{screenSnippets}{setHeader}        = "$webworkDirs{conf}/snippets/setHeader.pg"; # screenSetHeader.pg"
$webworkFiles{screenSnippets}{setHeader}       = "$courseDirs{templates}/ASimpleScreenHeaderFile.pg"; # An alternate default header file

# A PG template for creation of new problems.
$webworkFiles{screenSnippets}{blankProblem}    = "$webworkDirs{conf}/snippets/blankProblem2.pg"; # screenSetHeader.pg"

# A site info  "message of the day" file
$webworkFiles{site_info}                       = "$webworkDirs{htdocs}/site_info.txt";

################################################################################
# Course-specific files
################################################################################

# The course configuration file.
$courseFiles{environment} = "$courseDirs{root}/course.conf";

# The course simple configuration file (holds web-based configuratoin).
$courseFiles{simpleConfig} = "$courseDirs{root}/simple.conf";

# File contents are displayed after login, on the problem sets page. Path given
# here is relative to the templates directory.
$courseFiles{course_info} = "course_info.txt";

# File contents are displayed on the login page. Path given here is relative to
# the templates directory.
$courseFiles{login_info}  = "login_info.txt";

# These course specific files cannot be edited from the File Manager for saftey reasons except
# by an administrator.  These are paths relative to the course directory.
$uneditableCourseFiles = ['simple.conf',
			  'course.conf',
    ];

# Additional library buttons can be added to the Library Browser (SetMaker.pm)
# by adding the libraries you want to the following line.  For each key=>value
# in the list, if a directory (or link to a directory) with name 'key' appears
# in the templates directory, then a button with name 'value' will be placed at
# the top of the problem browser.  (No button will appear if there is no
# directory or link with the given name in the templates directory.)  For
# example,
# 
#     $courseFiles{problibs} = {rochester => "Rochester", asu => "ASU"};
# 
# would add two buttons, one for the Rochester library and one for the ASU
# library, provided templates/rochester and templates/asu exists either as 
# subdirectories or links to other directories. The "OPL Directory" button
# activated below gives access to all the directories in the National 
# Problem Library.
# 
$courseFiles{problibs}    = {
	Library          => "OPL Directory",
	Contrib          => "Contrib", # remember to create link from Contrib to Contrib 
	                               # library directory
	capaLibrary      => "CAPA",    # remember to create link from capaLibrary to CAPA
	                               # in contrib
};

################################################################################
# Status system
################################################################################

# This is the default status given to new students and students with invalid
# or missing statuses.
$default_status = "Enrolled";

# The first abbreviation in the abbreviations list is the canonical
# abbreviation, and will be used when setting the status value in a user record
# or an exported classlist file.
# 
# Results are undefined if more than one status has the same abbreviation.
# 
# The four behaviors that are controlled by status are:
#   allow_course_access   => is this user allowed to log in?
#   include_in_assignment => is this user included when assigning as set to "all" users?
#   include_in_stats      => is this user included in statistical reports?
#   include_in_email      => is this user included in emails sent to the class?
#   include_in_scoring    => is this user included in score reports?

%statuses = (
	Enrolled => {
		abbrevs => [qw/ C c current enrolled /],
		behaviors => [qw/ allow_course_access include_in_assignment include_in_stats include_in_email include_in_scoring /],
	},
	Audit => {
		abbrevs => [qw/ A a audit /],
		behaviors => [qw/ allow_course_access include_in_assignment include_in_stats include_in_email /],
	},
	Drop => {
		abbrevs => [qw/ D d drop withdraw /],
		behaviors => [qw/  /],
	},
	Proctor => { 
		abbrevs => [qw/ P p proctor /],
		behaviors => [qw/  /],
	},
);

################################################################################
# Database options
################################################################################

# these variables are used by database.conf. we define them here so that editing
# database.conf isn't necessary.

# required permissions
# GRANT SELECT ON webwork.* TO webworkRead@localhost IDENTIFIED BY 'passwordRO';
# GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, ALTER, DROP, INDEX, LOCK TABLES ON webwork.* TO webworkWrite@localhost IDENTIFIED BY 'passwordRW';


################################################################################
# set these variables in site.conf
#
# $database_dsn = "dbi:mysql:webwork";
# $database_username = "webworkWrite";
# $database_password = ""; #set this in site.conf
# $database_debug = 0;
################################################################################



# Database schemas are defined in the file conf/database.conf and stored in the
# hash %dbLayouts. The standard schema is called "sql_single";


include( "./conf/database.conf.dist");  # always include database.conf.dist

                                    # in the rare case where you want local overrides
                                    # you can place include("conf/database.conf") in
                                    # the database.conf.dist file
# this change is meant to help alleviate the common mistake of forgetting to update the 
# database.conf file when changing WW versions.

# Select the default database layout. This can be overridden in the course.conf
# file of a particular course. The only database layout supported in WW 2.1.4
# and up is "sql_single".
$dbLayoutName = "sql_single";

# This sets the symbol "dbLayout" as an alias for the selected database layout.
*dbLayout     = $dbLayouts{$dbLayoutName};

# This sets the max course id length.  It might need to be changed depending
# on what database tables are present.  Mysql allows a max table length of 68
# characters.  With the ${course_id}_global_user_achievement table that means
# the max ${course_id} is about 40 characters

$maxCourseIdLength = 40;

################################################################################
# Problem library options
################################################################################
# 
# The problemLibrary configuration data should now be set in localOverrides.conf

# For configuration instructions, see:
# http://webwork.maa.org/wiki/National_Problem_Library
# The directory containing the open problem library files. 
# Set the root to "" if no problem
# library is installed. Use version 2.0 for the NPL and use the version 2.5  for the OPL. 
# When changing from the NPL to the OPL it is important to change the version number
# because the names of the tables in the database have changed.

#RE-CONFIGURE problemLibrary values in localOverrides.conf 
# if these defaults are not correct. 
#################################################
$problemLibrary{root}        ="/opt/webwork/libraries/webwork-open-problem-library/OpenProblemLibrary";
$problemLibrary{version}     ="2.5"; # 2.0 for NPL, 2.5 for OPL
###########################################################

# Problem Library SQL database connection information
$problemLibrary_db = {
        dbsource => $database_dsn,
        user     => $database_username,
        passwd   => $database_password,
        storage_engine => 'MYISAM',
};

$problemLibrary{tree} = 'library-directory-tree.json';

# These flags control if statistics on opl problems are shown in the library
# browser.  If you want to include local statistics you will need to
# run webwork2/bin/update-OPL-statistics on a regular basis.  
$problemLibrary{showLibraryLocalStats} = 1;
# This flag controls whether global statistics will0be displayed
$problemLibrary{showLibraryGlobalStats} = 1;

################################################################################
# Logs
################################################################################


# Logs data about how long it takes to process problems. (Do not confuse this
# with the /other/ timing log which can be set by WeBWorK::Timing and is used
# for benchmarking system performance in general. At some point, this timing
# mechanism will be deprecated in favor of the WeBWorK::Timing mechanism.)
$webworkFiles{logs}{timing}         = "$webworkDirs{logs}/timing.log";

# Logs data about how long it takes to process problems. (Do not confuse this
# with the /other/ timing log which can be set by WeBWorK::Timing and is used
# for benchmarking system performance in general. At some point, this timing
# mechanism will be deprecated in favor of the WeBWorK::Timing mechanism.)
$webworkFiles{logs}{render_timing}         = "$webworkDirs{logs}/render_timing.log";

# Logs courses created via the web-based Course Administration module.
$webworkFiles{logs}{hosted_courses} = "$webworkDirs{logs}/hosted_courses.log";

# The transaction log contains data from each recorded answer submission. This
# is useful if the database becomes corrupted.
$webworkFiles{logs}{transaction}    = "$webworkDirs{logs}/${courseName}_transaction.log";

# The answer log stores a history of all users' submitted answers.
$courseFiles{logs}{answer_log}      = "$courseDirs{logs}/answer_log";

# Log logins.
$courseFiles{logs}{login_log}       = "$courseDirs{logs}/login.log";

# Log for almost every click.  By default it is the empty string, which
# turns this log off.  If you want it turned on, we suggest
#                "$courseDirs{logs}/activity.log"
# When turned on, this log can get quite large.
$courseFiles{logs}{activity_log} = '';

################################################################################
# Site defaults (Usually overridden in localOverrides.conf)
################################################################################

# The default_templates_course is used by default to create a new course.
# The contents of the templates directory are copied from this course
# to the new course being created.
$siteDefaults{default_templates_course} ="modelCourse";

################################################################################
# Authentication system
################################################################################

# FIXME This mechanism is a little awkward and probably should be merged with
# the dblayout selection system somehow.

# Select the authentication module to use for normal logins.
# 
# If this value is a string, the given authentication module will be used
# regardless of the database layout. If it is a hash, the database layout name
# will be looked up in the hash and the resulting value will be used as the
# authentication module. The special hash key "*" is used if no entry for the
# current database layout is found.
# If this value is a sequence of strings or hashes, then each
# string or hash in the sequence will be successively tested to see if it 
# provides a module that can handle
# the authentication request (by calling the module's 
#   sub  request_has_data_for_this_verification_module ).
# The first module that responds affirmatively will be used.
# 
# 
$authen{user_module} = {
	# sql_moodle => "WeBWorK::Authen::Moodle",
	# sql_ldap   => "WeBWorK::Authen::LDAP",
	"*" => "WeBWorK::Authen::Basic_TheLastOption",
};

# Select the authentication module to use for proctor logins.
# 
# A string or a hash is accepted, as above.
# 
$authen{proctor_module} = "WeBWorK::Authen::Proctor";
$authen{xmlrpc_module}  = "WeBWorK::Authen::XMLRPC";
################################################################################
# Authorization system (Make local overrides in localOverrides.conf )
################################################################################

# this section lets you define which groups of users can perform which actions.

# this hash maps a numeric permission level to the name of a role. the number
# assigned to a role is significant -- roles with higher numbers are considered
# "more privileged", and are included when that role is listed for a privilege
# below.
# 
%userRoles = (
	guest         => -5,
	student       => 0,
	login_proctor => 2,
	grade_proctor => 3,
	ta            => 5,
	professor     => 10,
	admin         => 20,
	nobody        => 99999999, # insure that nobody comes at the end
);

# this hash maps operations to the roles that are allowed to perform those
# operations. the role listed and any role with a higher permission level (in
# the %userRoles hash) will be allowed to perform the operation. If the role
# is undefined, no users will be allowed to perform the operation.
# 
%permissionLevels = (
	login                          => "guest",
	report_bugs                    => "ta",
	submit_feedback                => "student",
	change_password                => "student",
	change_email_address           => "student",
	
	proctor_quiz_login             => "login_proctor",
	proctor_quiz_grade             => "grade_proctor",
	view_proctored_tests           => "student",
	view_hidden_work               => "ta",
	
	view_multiple_sets             => "ta",
	view_unopened_sets             => "ta",
	view_hidden_sets               => "ta",
	view_answers                   => "ta",
	view_ip_restricted_sets        => "ta",
	
	become_student                 => "professor",
	access_instructor_tools        => "ta",
	score_sets                     => "professor",
	send_mail                      => "professor",
	receive_feedback               => "ta",
	
	create_and_delete_problem_sets => "professor",
	assign_problem_sets            => "professor",
	modify_problem_sets            => "professor",
	modify_student_data            => "professor",
	modify_classlist_files         => "professor",
	modify_set_def_files           => "professor",
	modify_scoring_files           => "professor",
	modify_problem_template_files  => "professor",
	manage_course_files            => "professor",
	edit_achievements			   => "professor",
	create_and_delete_courses      => "professor",
	fix_course_databases           => "professor",
	modify_tags                    => undef,
    edit_restricted_files          => "admin",
	
	##### Behavior of the interactive problem processor #####
	show_resource_info                              => "admin",
	show_correct_answers_before_answer_date         => "ta",
	show_solutions_before_answer_date               => "ta",
	avoid_recording_answers                         =>  "nobody", # record the grade/status/state of everyone's entries.
	                                                              # Setting this to "ta" would record grade/status/state 
	                                                              # for students but not TA's or professors;
	                                                              # TA's and above could avoid having their answers recorded.
	                                                              
        # controls if old answers can be shown
	can_show_old_answers                            => "student",
	check_answers_before_open_date                  => "ta",
	check_answers_after_open_date_with_attempts     => "guest",
	check_answers_after_open_date_without_attempts  => "guest",
	check_answers_after_due_date                    => "guest",
	check_answers_after_answer_date                 => "guest",
        can_check_and_submit_answers                    => "ta", 
	create_new_set_version_when_acting_as_student   => undef,
	print_path_to_problem                           => "professor", # see "Special" PG environment variables
	always_show_hint								=> "professor", # see "Special" PG environment variables
	always_show_solution							=> "professor",  # see "Special" PG environment variables
	record_set_version_answers_when_acting_as_student => undef,
	record_answers_when_acting_as_student           => undef,
	# "record_answers_when_acting_as_student" takes precedence
	# over the following for professors acting as students:
	record_answers_before_open_date                 => undef,
	record_answers_after_open_date_with_attempts    => "student",
	record_answers_after_open_date_without_attempts => undef,
	record_answers_after_due_date                   => undef,
	record_answers_after_answer_date                => undef,
#	dont_log_past_answers                           => "professor",  # set this in localOverrides.conf
													#controls logging of the responses to a question
                                                    # in the past answer data base
                                                    # and in the myCourse/logs/answer_log file.
                                                    # Activities of users with this permission enabled are not entered
                                                    # in these logs.  This might be used when collecting student data
                                                    # to avoid contaminating the data with TA and instructor activities.
                                                    # The professor setting means that  professor's answers are not logged or 
                                                    # saved in the past answer database.
	view_problem_debugging_info                     => "ta",
	show_pg_info_checkbox                           => "admin",
	show_answer_hash_info_checkbox					=> "admin",
	show_answer_group_info_checkbox					=> "admin",
	##### Behavior of the Hardcopy Processor #####
	
	download_hardcopy_multiuser  => "ta",
	download_hardcopy_multiset   => "ta",
	download_hardcopy_view_errors =>"professor",
	download_hardcopy_format_pdf => "guest",
	download_hardcopy_format_tex => "ta",
	download_hardcopy_change_theme=> "ta", 
);

# This is the default permission level given to new students and students with
# invalid or missing permission levels.
$default_permission_level = $userRoles{student};

################################################################################
# Session options
################################################################################

# $sessionKeyTimeout defines seconds of inactivity before a key expires
$sessionKeyTimeout = 60*30;

# $sessionKeyLength defines the length (in characters) of the session key
$sessionKeyLength = 32;

# @sessionKeyChars lists the legal session key characters
@sessionKeyChars = ('A'..'Z', 'a'..'z', '0'..'9');

# Practice users are users who's names start with $practiceUser
# (you can comment this out to remove practice user support)
$practiceUserPrefix = "practice";

# There is a practice user who can be logged in multiple times.  He's
# commented out by default, though, so you don't hurt yourself.  It is
# kindof a backdoor to the practice user system, since he doesn't have a
# password.  Come to think of it, why do we even have this?!
#$debugPracticeUser = "practice666";

# Option for gateway tests; $gatewayGracePeriod is the time in seconds
# after the official due date during which we'll still grade the test
$gatewayGracePeriod = 120;

################################################################################
# Session Management
################################################################################

## Session management, i.e., checking whether the session has timed out,
## can be handled either using the key database, the traditional method,
## or by using session cookies.  If one is using the key database
## for session_management and is using WeBWorK's password authentication,
## then one has the option of keeping a Login cookie with a duration
## of up to 30 days.  However, if one uses cookies for session management,
## then one cannot also use Login cookies.  So session managment using
## cookies is more appropriate when external authentication systems
## are used, e.g., LDAP, LTIBasic, etc.
##

## The following ability to update the cookie timestamp instead of the timestamp in the database
## has been disabled for now.  It opens a potential security hole. 
## Setting $session_management_via="session_cookies" sets a session cookie automatically
## even if you don't ask for it explicitly and this login cookie contains a session_key which
## allows you to reenter your course (within 20 minutes or so) even if you move away from the 
## webwork HTML page and loose the session_key embedded in the HTML page.
## However the time stamp in the cookie is not used currently used for anything.
## 
#### NOT CURRENT:  The reason one might want to use cookies for session management
#### is to avoid having to obtain a write lock on the Key database
#### every time a request is received in order to update the timestamp
#### in the Key database.  When cookies are used for session management,
#### one obtains a write lock on the Key database for the original
#### login request in order to write the new session key and its initial
#### timestamp to the Key database, but on subsequent requests,
#### one merely obtains a read lock on the Key database in order
#### to verify that the session key in the session cookie is the
#### same as the session key in the Key database.  The session timestamp
#### is maintained in the cookie, not in the Key database, which will
#### only show the timestamp of the original login.



## For session management using session_cookies, uncomment the first of the 
## following lines.  
## For session management using keys stored
## in the  key  database and, possibly, enduring cookies if any have been set,
## uncomment the second line.

## These choices can be overridden locally in the localOverrides.conf file.
## The default is to use "session_cookie".

$session_management_via = "session_cookie";
#$session_management_via = "key";


################################################################################
# PG subsystem options
################################################################################

# List of enabled display modes. Comment out any modes you don't wish to make
# available for use.
$pg{displayModes} = [
#	"plainText",     # display raw TeX for math expressions
	"images",        # display math expressions as images generated by dvipng
	"MathJax",       # render TeX math expressions on the client side using MathJax --- we strongly recommend people install and use MathJax, and it is requred if you want to use mathview
];


##########################################################################################
#### Default settings for homework editor pages
##########################################################################################

# Whether the homework editor pages should show the datetimepicker
$options{useDateTimePicker} = 1;

# Whether the homework editor pages should show options for conditional release

$options{enableConditionalRelease} = 0;

# In the hmwk sets editor, how deep to search within templates for .def files;
# 0 means only within templates
$options{setDefSearchDepth} = 0;

# In the hmwk sets editor, delve into the OPL while searching for .def files?
$options{useOPLdefFiles} = 0;


##########################################################################################
#### Default settings for the problem grader page
##########################################################################################

# gap betweens cores in score dropdown - e.g. 5 gives 5, 10, 15, 20
$options{problemGraderScoreDelta} = 5;

##########################################################################################
#### Default settings for the problem editor pages
##########################################################################################

# This sets if the PG editor should use a js based "codemirror" editor or
# just a textarea
$options{PGCodeMirror} = 1;

# This sets if mathview is available on the PG editor for use as a minimal latex equation editor
$options{PGMathView} = 0;
# This sets if WirisEditor is available on the PG editor for use as a minimal latex equation editor
$options{PGWirisEditor}= 0;
# This sets if MathQuill is available on the PG editor for use as a minimal latex equation editor
$options{PGMathQuill}= 0;


###########################################################################################
#### Default settings for the PG translator
#### This section controls the display of equations, HINTS, answers, SOLUTIONS, 
#### "sticky_answers" a.k.a. showOldAnswers,
#### coloring of answer blanks and the numeric display of entered answers.
###########################################################################################

# Default display mode. Should be listed above (uncomment only one).
$pg{options}{displayMode}        = "images";

# The default grader to use, if a problem doesn't specify.
$pg{options}{grader}             = "avg_problem_grader";

# Fill in answer blanks with the student's last answer by default?
$pg{options}{showOldAnswers}     = 1;

# Default for showing the MathView preview system.  To completely disable MathView you need to change the PG special environment variable. 
$pg{options}{useMathView}        = 1;
# This is the operations file to use for mathview,  each contains a different locale.  
$pg{options}{mathViewLocale}     = "mv_locale_us.js";

# Default for showing the WirisEditor preview system.  To completely disable WirisEditor you need to change the PG special environment variable. 
$pg{options}{useWirisEditor}     = 1;


# Default for showing the MathQuill preview system.  To completely disable MathQuill you need to change the PG special environment variable. 
$pg{options}{useMathQuill}     = 1;

# Show correct answers (when allowed) by default?
$pg{options}{showCorrectAnswers} = 0;  # this is a backup value use when nothing else has been set. I can think of no case where it should anything but zero.

# Customize hints and solutions
# Show hints (when allowed) by default?
$pg{options}{showHints}          = 0;  # this is a backup value use when nothing else has been set. I can think of no case where it should anything but zero.


# Show solutions (when allowed) by default?
$pg{options}{showSolutions}      	= 0;  # this is a backup value use when nothing else has been set. I can think of no case where it should anything but zero.
$pg{options}{showAnsGroupInfo}      = 0;
$pg{options}{showAnsHashInfo}      	= 0;
$pg{options}{showPGInfo}       		= 0;

# By default hints and solutions are ALWAYS shown for professors (and above) so that they
# can check hints and solutions easily and make corrections.  
# To disable this feature set the permission  levels
# 		always_show_hint  to  "nobody" (by default this is "professor")
# and	always_show_solution to "nobody" (by default this is "professor")
# This is done in the %permissions section above.

# If always_show_hint is set to "nobody" then hints are shown, even to professors, only after
# a certain number of submissions have occurred.  This number is set in each problem with
# the variable $main::showHints


# Use knowls for hints
$pg{options}{use_knowls_for_hints}          = 1; 

# Use knowls for solutions
$pg{options}{use_knowls_for_solutions}      = 1; 

# The buttons below are active only if knowls are being used. If set to 1 then the hints (and solutions)
# checkboxes are shown and when these are checked and the problem resubmitted THEN the knowls outline
# appears.  I can't immediately think of a useful case where these should be set to 1.  If knowls are not being 
# used then these checkboxes are ALWAYS shown when a hint or solution is available and the value 
# of these two options is ignored.

# Show solution checkbox
$pg{options}{show_solution_checkbox} = 0;

# Show hint checkbox
$pg{options}{show_hint_checkbox}     = 0;

# Display the "Entered" column which automatically shows the evaluated student answer, e.g. 1 if student input is sin(pi/2).
# If this is set to 0, e.g. to save space in the response area, the student can still see their evaluated answer by hovering
# the mouse pointer over the typeset version of their answer
$pg{options}{showEvaluatedAnswers}      = 1;

# Catch translation warnings internally by default? (We no longer need to do
# this, since there is a global warnings handler. So this should be off.)
$pg{options}{catchWarnings}      = 0;

# decorations for correct input blanks -- apparently you can't define and name attribute collections in a .css file
$pg{options}{correct_answer} = "{border-width:2;border-style:solid;border-color:#8F8}"; #matches resultsWithOutError class in math2.css

# decorations for incorrect input blanks
$pg{options}{incorrect_answer} = "{border-width:2;border-style:solid;border-color:#F55}"; #matches resultsWithError class in math2.css

##### Currently-selected renderer

# Only the local renderer is supported in this version.
$pg{renderer} = "WeBWorK::PG::Local";

# The remote renderer connects to an XML-RPC PG rendering server.
#$pg{renderer} = "WeBWorK::PG::Remote";

##### Renderer-dependent options

# The remote renderer has one option:
$pg{renderers}{"WeBWorK::PG::Remote"} = {
	# The "proxy" server to connect to for remote rendering.
	proxy => "http://localhost:21000/RenderD",
};

##### Settings for various display modes

# "images" mode has several settings:
$pg{displayModeOptions}{images} = {
	# Determines the method used to align images in output. Can be
	# "baseline", "absmiddle", or "mysql".
	dvipng_align => 'mysql', 

	# If mysql is chosen, this information indicates which database contains the
	# 'depths' table. Since 2.3.0, the depths table is kept in the main webwork
	# database. (If you are upgrading from an earlier version of webwork, and
	# used the mysql method in the past, you should move your existing 'depths'
	# table to the main database.)
	dvipng_depth_db => {
		dbsource => $database_dsn,
		user     => $database_username,
		passwd   => $database_password,
	},
};

##### Directories used by PG

# The root of the PG directory tree (from pg_root in Apache config).
$pg{directories}{root}   = "$pg_dir";
$pg{directories}{lib}    = "$pg{directories}{root}/lib";
$pg{directories}{macros} = "$pg{directories}{root}/macros";

#
#  The macro file search path.  Each directory in this list is seached
#  (in this order) by loadMacros() when it looks for a .pl file.
#
$pg{directories}{macrosPath} = [
   ".",                     # search the problem file's directory
   $courseDirs{macros},
   $pg{directories}{macros},
   "$courseDirs{templates}/Library/macros/Union",
   "$courseDirs{templates}/Library/macros/Michigan",
   "$courseDirs{templates}/Library/macros/CollegeOfIdaho",
   "$courseDirs{templates}/Library/macros/FortLewis",
   "$courseDirs{templates}/Library/macros/TCNJ",
   "$courseDirs{templates}/Library/macros/NAU",
   "$courseDirs{templates}/Library/macros/Dartmouth",
   "$courseDirs{templates}/Library/macros/WHFreeman",
   "$courseDirs{templates}/Library/macros/UMass-Amherst",
   "$courseDirs{templates}/Library/macros/PCC",
   "$courseDirs{templates}/Library/macros/Alfred",
   "$courseDirs{templates}/Library/macros/Wiley",
   "$courseDirs{templates}/Library/macros/UBC",
   "$courseDirs{templates}/Library/macros/Hope",
   "$courseDirs{templates}/Library/macros/MC",
   "$courseDirs{templates}/Library/macros/UniSiegen",
];

# The applet search path. If a full URL is given, it is used unmodified. If an
# absolute path is given, the URL of the local server is prepended to it.
# 
# For example, if an item is "/math/applets",
# and the local server is  "https://math.yourschool.edu",
# then the URL "https://math.yourschool.edu/math/applets" will be used.
# 

$pg{directories}{appletPath} = [    # paths to search for applets (requires full url)
	"$webworkURLs{htdocs}/applets",
	"$webworkURLs{htdocs}/applets/geogebra_stable",
	"$courseURLs{html}/applets",  
	"$webworkURLs{htdocs}/applets/Xgraph",
	"$webworkURLs{htdocs}/applets/PointGraph",
	"$webworkURLs{htdocs}/applets/Xgraph",
	"$webworkURLs{htdocs}/applets/liveJar",
	"$webworkURLs{htdocs}/applets/Image_and_Cursor_All",
];


$pg{directories}{htmlPath} = [    # paths to search for auxilary html files (requires full url)
    ".",
	"$courseURLs{html}",  
	"$webworkURLs{htdocs}",
];
$pg{directories}{imagesPath} = [    # paths to search for image files (requires full url)
    ".",
	"$courseURLs{html}/images", 
	"$webworkURLs{htdocs}/images", 
];
$pg{directories}{pdfPath} = [    # paths to search for pdf files (requires full url)
    ".",
	"$courseURLs{html}/pdf", 
	"$webworkURLs{htdocs}/pdf", 	
];
##### "Special" PG environment variables. (Stuff that doesn't fit in anywhere else.)

# Users for whom to print the file name of the PG file being processed.
$pg{specialPGEnvironmentVars}{PRINT_FILE_NAMES_FOR} = [ "professor", ];  
   # ie file paths are printed for 'gage'
$pg{specialPGEnvironmentVars}{PRINT_FILE_NAMES_PERMISSION_LEVEL} = 
        $userRoles{ $permissionLevels{print_path_to_problem} }; 
   # (file paths are also printed for anyone with this permission or higher)
$pg{specialPGEnvironmentVars}{ALWAYS_SHOW_HINT_PERMISSION_LEVEL} = 
        $userRoles{ $permissionLevels{always_show_hint} }; 
   # (hints are automatically shown to anyone with this permission or higher)
$pg{specialPGEnvironmentVars}{ALWAYS_SHOW_SOLUTION_PERMISSION_LEVEL} = 
        $userRoles{ $permissionLevels{always_show_solution} }; 
   # (solutions are automatically shown to anyone with this permission or higher)
$pg{specialPGEnvironmentVars}{VIEW_PROBLEM_DEBUGGING_INFO} = 
        $userRoles{ $permissionLevels{view_problem_debugging_info} }; 
 # (variable wether to show the debugging info from a problem to a student)
   
$pg{specialPGEnvironmentVars}{use_knowls_for_hints}     = $pg{options}{use_knowls_for_hints};
$pg{specialPGEnvironmentVars}{use_knowls_for_solutions} = $pg{options}{use_knowls_for_solutions};

# whether to use javascript for rendering Live3D graphs
$pg{specialPGEnvironmentVars}{use_javascript_for_live3d} = 1;

   #  set the flags immediately above in the $pg{options} section above -- not here.

# Locations of CAPA resources. (Only necessary if you need to use converted CAPA
# problems.)
$pg{specialPGEnvironmentVars}{CAPA_Tools}             = "$courseDirs{templates}/capaLibrary/macros/CAPA_Tools/",
$pg{specialPGEnvironmentVars}{CAPA_MCTools}           = "$courseDirs{templates}/capaLibrary/macros/CAPA_MCTools/",
$pg{specialPGEnvironmentVars}{CAPA_GraphicsDirectory} = "$webworkDirs{htdocs}/CAPA_Graphics/",
$pg{specialPGEnvironmentVars}{CAPA_Graphics_URL}      = "$webworkURLs{htdocs}/CAPA_Graphics/",

# Size in pixels of dynamically-generated images, i.e. graphs.
$pg{specialPGEnvironmentVars}{onTheFlyImageSize}      = 400,
 
# To disable the Parser-based versions of num_cmp and fun_cmp, and use the
# original versions instead, set this value to 1.
$pg{specialPGEnvironmentVars}{useOldAnswerMacros} = 0;

# Strings to insert at the start and end of the body of a problem
#  (at beginproblem() and ENDDOCUMENT) in various modes.  More display modes
#  can be added if different behaviours are desired (e.g., HTML_dpng,
#  HTML_asciimath, etc.).  These parts are not used in the Library browser.

$pg{specialPGEnvironmentVars}{problemPreamble} = { TeX => '', HTML=> '' };
$pg{specialPGEnvironmentVars}{problemPostamble} = { TeX => '', HTML=>'' };

# this snippet checks to see if Moodle has already called MathJax
# $pg{specialPGEnvironmentVars}{problemPreamble} = { TeX => '', HTML=> <<END_PREAMBLE };
# 
# 	<script type="text/x-mathjax-config">
# 	if (MathJax.Hub.Startup.params.config && MathJax.Hub.config.config.length) {
# 	    MathJax.Hub.Config({
# 	      config: [],
# 	      skipStartupTypeset: false
# 	    });
# 	  }
# 	</script>
# END_PREAMBLE

# 
# $pg{specialPGEnvironmentVars}{problemPostamble} = { TeX => '', HTML=> <<END_POSTAMBLE };
# 
# 
# END_POSTAMBLE

# Note!  problemPreamble and problemPostamble are becoming depreciated,
#        so you probably wouldn't use them
# To have the problem body indented and boxed, uncomment:
#$pg{specialPGEnvironmentVars}{problemPreamble}{HTML} = qq!<div class="problem-content">\n!;
#$pg{specialPGEnvironmentVars}{problemPostamble}{HTML}= qq!</div>\n!;

# To have the problem body indented and boxed, uncomment:
# $pg{specialPGEnvironmentVars}{problemPreamble}{HTML} = '<BLOCKQUOTE>
#    <TABLE BORDER=1 CELLSPACING=1 CELLPADDING=15 BGCOLOR=#E8E8E8><TR><TD>'; 
# $pg{specialPGEnvironmentVars}{problemPostamble}{HTML} = '</TD></TR></TABLE>
#     </BLOCKQUOTE>';

##### PG modules to load

# The first item of each list is the module to load. The remaining items are
# additional packages to import.
#
# That is: If you wish to include a module MyModule.pm which depends
# on additional modules Dependency1.pm and Dependency2.pm, these
# should appear as [qw(Mymodule.pm, Dependency1.pm, Dependency2.pm)]

${pg}{modules} = [
    [qw(Encode)],
	[qw(Encode::Encoding)],
        [qw(HTML::Parser)],
        [qw(HTML::Entities)],
	[qw(DynaLoader)],
	[qw(Encode)],
	[qw(Exporter )],
	[qw(GD)],
	[qw(AlgParser AlgParserWithImplicitExpand Expr ExprWithImplicitExpand utf8)],
	[qw(AnswerHash AnswerEvaluator)],
	[qw(WWPlot)], # required by Circle (and others)
	[qw(Circle)],
	[qw(Class::Accessor)],
	[qw(Complex)],
	[qw(Complex1)],
	[qw(Distributions)],
	[qw(Fraction)],
	[qw(Fun)],
	[qw(Hermite)],
	[qw(Label)],
	[qw(ChoiceList)],
	[qw(Match)],
	[qw(MatrixReal1)], # required by Matrix
	[qw(Matrix)],
	[qw(Multiple)],
	[qw(PGrandom)],
	[qw(Regression)],
	[qw(Select)],
	[qw(Units)],
	[qw(VectorField)],
	[qw(Parser Value)],
	[qw(Parser::Legacy)],
        [qw(Statistics)],
#	[qw(SaveFile)],
    [qw(Chromatic)], # for Northern Arizona graph problems 
#                    #  -- follow instructions at libraries/nau_problib/lib/README to install
    [qw(Applet FlashApplet JavaApplet CanvasApplet GeogebraWebApplet)],
	[qw(PGcore PGalias PGresource PGloadfiles PGanswergroup PGresponsegroup  Tie::IxHash)],
	[qw(Locale::Maketext)],
	[qw(WeBWorK::Localize)],
	[qw(JSON)],
        [qw(Rserve Class::Tiny IO::Handle)],
];

##### Problem creation defaults

# The default weight (also called value) of a problem to use when using the 
# Library Browser, Problem Editor or Hmwk Sets Editor to add problems to a set
# or when this value is left blank in an imported set definition file.
$problemDefaults{value} = 1;  

# The default max_attempts for a problem to use when using the 
# Library Browser, Problem Editor or Hmwk Sets Editor to add problems to a set
# or when this value is left blank in an imported set definition file.  Note that 
# setting this to -1 gives students unlimited attempts.
$problemDefaults{max_attempts} = -1;   

# The default showMeAnother for a problem to use when using the 
# Library Browser, Problem Editor or Hmwk Sets Editor to add problems to a set
# or when this value is left blank in an imported set definition file.  Note that 
# setting this to -1 disables the showMeAnother button
$problemDefaults{showMeAnother} = -2;   

#The default attempts to open children value to use when adding
# a problem.  This only matters for JITAR sets
$problemDefaults{att_to_open_children} = 1;

#The default counts for parent grade problem value to use when adding
# a problem.  This only matters for JITAR sets
$problemDefaults{counts_parent_grade} = 0;

# The default prPeriod value (re-randomization period) to use for the newly created problem.
# It is suggested to use the value of -1, which means that the course-wide setting would be used
# Setting this to -1 defaults to the use of course-wide settings (suggested)
# Setting this to 0 disables periodic randomization regardless of the course-wide setting
# Setting this to a positive value will override the course-wide setting
$problemDefaults{prPeriod} = -1;

##### Answer evaluatior defaults

$pg{ansEvalDefaults} = {
	functAbsTolDefault            => .001,
	functLLimitDefault            => .0000001,
	functMaxConstantOfIntegration => 1E8,
	functNumOfPoints              => 3,
	functRelPercentTolDefault     => .1,
	functULimitDefault            => .9999999,
	functVarDefault               => "x",
	functZeroLevelDefault         => 1E-14,
	functZeroLevelTolDefault      => 1E-12,
	numAbsTolDefault              => .001,
	numFormatDefault              => "",
	numRelPercentTolDefault       => .1,
	numZeroLevelDefault           => 1E-14,
	numZeroLevelTolDefault        => 1E-12,
	useBaseTenLog                 => 0,
	defaultDisplayMatrixStyle     => "[s]",  # left delimiter, middle line delimiters, right delimiter
	enableReducedScoring          => 0,
	reducedScoringPeriod          => 0,	# Default length of Reduced Scoring Period in minutes
	reducedScoringValue	     => .75,	# Percent of score students recieve in Reduced Scoring Period
	timeAssignDue				  => "11:59pm",
	assignOpenPriorToDue	      => 14400, # a number of minutes (default is 10 days)
	answersOpenAfterDueDate       => 2880 # number of minutes (default is 2 days)
};



################################################################################
# Compatibility
################################################################################

# Define the old names for the various "root" variables.
$webworkRoot    = $webworkDirs{root};
$webworkURLRoot = $webworkURLs{root};
$pgRoot         = $pg{directories}{root};



################################################################################
# Webservices
################################################################################
$webservices = {
	enableCourseActions => 0, # enable createCourse, addUser, dropUser
	enableCourseActionsLog => 0,# enable logging of course actions
								# will log when courses are created and 
								# when students are added or dropped
	courseActionsLogfile => "$webworkDirs{logs}/courseactions.log",
	# enable this to assign all visible homework sets to new students
	# added by webservices
	courseActionsAssignHomework => 0, 
};


################################################################################
# Temporary hack for displaying the different versions of the editors
################################################################################

# These configurations can be overridden
# in course.conf file to tune the behavior for individual courses
# The items below can be placed in localOverrides.conf override the settings in this file
# One can also use $showeditors{classlisteditor1}=0; to override a setting.
%showeditors = (
	ww3 			   => 1,
	classlisteditor1   => 0, #classlisteditor1 is deprecated in favor of classlisteditor2
	classlisteditor2   => 1,

	homeworkseteditor1 => 0,
	homeworkseteditor2 => 1,

	problemsetdetail1  => 0,
	problemsetdetail2  => 1,

	librarybrowsernojs => 0,
	librarybrowser1    => 1,
	librarybrowser2    => 0,
	librarybrowser3    => 0,

	pgproblemeditor1   => 0,
	pgproblemeditor2   => 0,#pgproblemeditor2 is deprecated in favor of pgproblemeditor3
	pgproblemeditor3   => 1,
	simplepgeditor     => 0
);

###############################################################################
# DragMath and MathView editors
###############################################################################

# DragMath is disabled by default; can enable it in course.conf file
# is DragMath even a thing any more?
$pg{specialPGEnvironmentVars}{DragMath} = 0;
$pg{specialPGEnvironmentVars}{entryAssist} = 'None';
$pg{specialPGEnvironmentVars}{MathView} = 0;
$pg{specialPGEnvironmentVars}{WirisEditor} = 0;
$pg{specialPGEnvironmentVars}{MathQuill} = 0;
###############################################################################
# default Homework Config settings
###############################################################################

# time of day the assignment is due. 
$pg{timeAssignDue} = '11:59pm'; 

# number of minutes prior to due date that the assignment is open. 
$pg{assignOpenPriorToDue} = 10080;

#number of minutes after due date are the answers open;
$pg{answersOpenAfterDueDate} = 2880; 

###############################################################################
# Progress Bar switch
###############################################################################
$pg{options}{enableProgressBar} = 1;

################################################################################
# WeBWorK::ContentGenerator::Instructor::Config
################################################################################

# Configuation data
# It is organized by section.  The allowable types are
#  'text' for a text string (no quote marks allowed),
#  'number' for a number,
#  'list' for a list of text strings,
#  'permission' for a permission value,
#  'boolean' for variables which really hold 0/1 values as flags.
#  'checkboxlist' for variables which really hold a list of values which
#      can be independently picked yes/no as checkboxes

# Localization Info:  The doc strings in this portion are reproduced in
# lib/WeBWorK/Localize.pm soley so that xgettext.pl will
# include them when creating .pot files.  
# If you change these strings you should make the corresponding changes in
# Localize.pm 

$ConfigValues = [
    ['General',
		{ var => 'courseFiles{course_info}',
		  doc => 'Name of course information file',
		  doc2 => 'The name of course information file (located in the templates directory). Its contents are displayed in the right panel next to the list of homework sets.',
		  type => 'text'
		},
		{ 
		  var => 'defaultTheme',
		  doc => 'Theme (refresh page after saving changes to reveal new theme.)',
		  doc2 => 'There are currently two themes (or skins) to choose from: math3 and math4.  The theme specifies a unified look and feel for the WeBWorK course web pages.',
		  values => [qw(math3 math4)],
		  type => 'popuplist',
		  hashVar => '{defaultTheme}'
		},
		  { var => 'language',
		  doc => 'Language (refresh page after saving changes to reveal new language.)',
		  doc2 => 'WeBWorK currently has translations for four languages: "English en", "Turkish tr", "Spanish es", and "French fr" ',
		  values => [qw(en tr es fr zh_hk heb)],
		  type => 'popuplist'
		},
		{ var => 'perProblemLangAndDirSettingMode',
		  doc => 'Mode in which the LANG and DIR settings for a single problem are determined.',
		  doc2 => 'Mode in which the LANG and DIR settings for a single problem are determined.<p>The system will set the LANGuage attribute to either a value determined from the problem, a course-wide default, or the system default of en-US, depending on the mode selected. The tag will only be added to the DIV enclosing the problem if it is different than the value which should be set in the main HTML tag set for the entire course based on the course language.<p>There are two options for the DIRection attribute: \"ltr\" for left-to-write sripts, and \"rtl\" for right-to-left scripts like Arabic and Hebrew.<p>The DIRection attribute is needed to trigger proper display of the question text when the problem text-direction is different than that used by the current language of the course. For example, English problems from the library browser would display improperly in RTL mode for a Hebrew course, unless the problen Direction is set to LTR.<p>The feature to set a problem language and direction was only added in 2018 to the PG language, so most problems will not declare their language, and the system needs to fall back to determining the language and direction in a different manner. The OPL itself is all English, so the system wide fallback is to en-US in LTR mode.<p>Since the defaults fall back to the LTR direction, most sites should be fine with the \"auto::\" mode, but may want to select the one which matches their course language. The mode \"force::ltr\" would also be an option for a course which runs into trouble with the \"auto\" modes.<p>Modes:<br><ul><li> \"none\" prevents any additional LANG and/or DIR tag being added. The browser will use the main setting which was applied to the entire HTML page. This is likely to cause trouble when a problem of the other direction is displayed.</li><li> \"auto::\" allows the system to make the settings based on the language and direction reported by the problem (a new feature, so not set in almost all existing problems) and falling back to the expected default of en-US in LTR mode. </li><li> \"auto:LangCode:Dir\" allows the system to make the settings based on the language and direction reported by the problem (a new feature, so not set in almost all existing problems) but falling back to the language with the given LangCode and the direction Dir when problem settings are not available from PG.</li><li> \"auto::Dir\" for problems without PG settings, this will use the default en=english language, but force the direction to Dir. Problems with PG settings will get those settings.</li><li> \"auto:LangCode:\" for problems without PG settings, this will use the default LTR direction, but will set the language to LangCode.Problems with PG settings will get those settings.</li><li> \"force:LangCode:Dir\" will <b>ignore</b> any setting made by the PG code of the problem, and will force the system to set the language with the given LangCode and the direction to Dir for <b>all</b> problems.</li><li> \"force::Dir\" will <b>ignore</b> any setting made by the PG code of the problem, and will force the system to set the direction to Dir for <b>all</b> problems, but will avoid setting any language attribute for individual problem.</li></ul>',
		  values => [qw(none auto:: force::ltr force::rtl force:en:ltr auto:en:ltr force:tr:ltr auto:tr:ltr force:es:ltr auto:es:ltr force:fr:ltr auto:fr:ltr force:zh_hk:ltr auto:zh_hk:ltr force:he:rtl auto:he:rtl   )],
		  type => 'popuplist'
		},
		{ var => 'sessionKeyTimeout',
		  doc => 'Inactivity time before a user is required to login again',
		  doc2 => 'Length of time, in seconds, a user has to be inactive before he is required to login again.<p> This value should be entered as a number, so as 3600 instead of 60*60 for one hour',
		  type => 'number'
		},
		{ var => 'siteDefaults{timezone}',
		  doc => 'Timezone for the course',
		  doc2 => 'Some servers handle courses taking place in different timezones.  If this course is not showing the correct timezone, enter the correct value here.  The format consists of unix times, such as "America/New_York","America/Chicago", "America/Denver", "America/Phoenix" or "America/Los_Angeles". Complete list: <a href="http://en.wikipedia.org/wiki/List_of_zoneinfo_time_zones">TimeZoneFiles</a>',
		  type => 'timezone',
		  hashVar => '{siteDefaults}->{timezone}'
		},
     		{ 
		  var => 'hardcopyTheme',
		  doc => 'Hardcopy Theme',
		  doc2 => 'There are currently two hardcopy themes to choose from: One Column and Two Columns.  The Two Columns theme is the traditional hardcopy format.  The One Column theme uses the full page width for each column',
		  values => $hardcopyThemes,
		  labels => $hardcopyThemeNames,
		  type => 'popuplist',
		  hashVar => '{hardcopyTheme}'
		},
        { var => 'options{useDateTimePicker}',
          doc => 'Use Date Picker',
          doc2 => 'Enables the use of the date picker on the Homework Sets Editor 2 page and the Problem Set Detail page',
          type => 'boolean'
	},
        { var => 'showCourseHomeworkTotals',
        	  doc => 'Show Total Homework Grade on Grades Page',
       		  doc2 => 'When this is on students will see a line on the Grades page which has their total cumulative homework score.  This score includes all sets assigned to the student.',
          	  type => 'boolean'
	},

            { var => 'pg{options}{enableProgressBar}',
        	  doc => 'Enable Progress Bar and current problem highlighting',
       		  doc2 => 'A switch to govern the use of a Progress Bar for the student; this also enables/disables the highlighting of the current problem in the side bar, and whether it is correct (&#x2713;), in progress (&hellip;), incorrect (&#x2717;), or unattempted (no symbol).',
          	  type => 'boolean'
	},
	 { 	var => 'pg{timeAssignDue}',
		doc => 'Default Time that the Assignment is Due',
		doc2 => 'The time of the day that the assignment is due.  This can be changed on an individual basis, but WeBWorK will use this value for default when a set is created.',
		type => 'time',
		hashVar => '{pg}->{timeAssignDue}'
	 },
	 {	var => 'pg{assignOpenPriorToDue}',
		doc => 'Default Amount of Time (in minutes) before Due Date that the Assignment is Open',
		doc2 => 'The amount of time (in minutes) before the due date when the assignment is opened.  You can change this for individual homework, but WeBWorK will use this value when a set is created. ',
		type => 'number',
		hashVar => '{pg}->{assignOpenPriorToDue}'
	 },
	 {	var => 'pg{answersOpenAfterDueDate}',
		doc => 'Default Amount of Time (in minutes) after Due Date that Answers are Open',
		doc2 => 'The amount of time (in minutes) after the due date that the Answers are available to student to view.  You can change this for individual homework, but WeBWorK will use this value when a set is created.',
		type => 'number',
		hashVar => '{pg}->{answersOpenAfterDueDate}'
	 },
    ],
	['Optional Modules',
    	{ var => 'achievementsEnabled',
		  doc => 'Enable Course Achievements',
		  doc2 => 'Activiating this will enable Mathchievements for webwork.  Mathchievements can be managed by using the Achievement Editor link.',
		  type => 'boolean'
		  },                
		 { var => 'achievementPointsPerProblem',
		  doc => 'Achievement Points Per Problem',
		  doc2 => 'This is the number of achievement points given to each user for completing a problem.',
		  type => 'number'
		  },
     	 { var => 'achievementItemsEnabled',
		  doc => 'Enable Achievement Items',
		  doc2 => 'Activiating this will enable achievement items. This features rewards students who earn achievements with items that allow them to affect their homework in a limited way.',
		  type => 'boolean'
	 },
	         { var => 'options{enableConditionalRelease}',
          doc => 'Enable Conditional Release',
          doc2 => 'Enables the use of the conditional release system.  To use conditional release you need to specify a list of set names on the Problem Set Detail Page, along with a minimum score.  Students will not be able to access that homework set until they have achieved the minimum score on all of the listed sets.',
          type => 'boolean'
	},
		{ var => 'pg{ansEvalDefaults}{enableReducedScoring}',
		  doc => 'Enable Reduced Scoring',
		  doc2 => 'This sets whether the Reduced Scoring system will be enabled.  If enabled you will need to set the default length of the reduced scoring period and the value of work done in the reduced scoring period below.  <p> To use this, you also have to enable Reduced Scoring for individual assignments and set their Reduced Scoring Dates by editing the set data.<p> This works with the avg_problem_grader (which is the the default grader) and the  std_problem_grader (the all or nothing grader).  It will work with custom graders if they are written appropriately.',
		  type => 'boolean'
		},
		{ var => 'pg{ansEvalDefaults}{reducedScoringValue}',
		  doc => 'Value of work done in Reduced Scoring Period' ,
		  doc2 => '<p>After the Reduced Scoring Date all additional work done by the student counts at a reduced rate. Here is where you set the reduced rate which must be a percentage. For example if this value is 50% and a student views a problem during the Reduced Scoring Period, they will see the message "You are in the Reduced Scoring Period: All additional work done counts 50% of the original." </p><p>To use this, you also have to enable Reduced Scoring and set the Reduced Scoring Date for individual assignments by editing the set data using the Hmwk Sets Editor.</p><p>This works with the avg_problem_grader (which is the the default grader) and the std_problem_grader (the all or nothing grader). It will work with custom graders if they are written appropriately.</p>' ,
		  labels=>{'0.1' => '10%',
			   '0.15' => '15%',
			   '0.2' => '20%',
			   '0.25' => '25%',
			   '0.3' => '30%',
			   '0.35' => '35%',
			   '0.4' => '40%',
			   '0.45' => '45%',
			   '0.5' => '50%',
			   '0.55' => '55%',
			   '0.6' => '60%',
			   '0.65' => '65%',
			   '0.7' => '70%',
			   '0.75' => '75%',
			   '0.8' => '80%',
			   '0.85' => '85%',
			   '0.9' => '90%',
			   '0.95' => '95%',
			   '1' => '100%'},
		  values => [qw(1 0.95 0.9 0.85 0.8 0.75 0.7 0.65 0.6 0.55 0.5 0.45 0.4 0.35 0.3 0.25 0.2 0.15 0.1)],
		  type => 'popuplist'
		},
	 { var => 'pg{ansEvalDefaults}{reducedScoringPeriod}',
	   doc => 'Default Length of Reduced Scoring Period in minutes',
	   doc2 => 'The Reduced Scoring Period is the default period before the due date during which all additional work done by the student counts at a reduced rate. When enabling reduced scoring for a set the reduced scoring date will be set to the due date minus this number. The reduced scoring date can then be changed. If the Reduced Scoring is enabled and if it is after the reduced scoring date, but before the due date, a message like "This assignment has a Reduced Scoring Period that begins 11/08/2009 at 06:17pm EST and ends on the due date, 11/10/2009 at 06:17pm EST. During this period all additional work done counts 50% of the original." will be displayed.' ,
	   type => 'number'
	 },
	 { var => 'pg{options}{enableShowMeAnother}',
	   doc => 'Enable Show Me Another button',
	   doc2 => 'Enables use of the Show Me Another button, which offers the student a newly-seeded version of the current problem, complete with solution (if it exists for that problem).',
	   type => 'boolean'
	 },
	 { var => 'pg{options}{showMeAnotherDefault}',
	   doc => 'Default number of attempts before Show Me Another can be used (-1 => Never)',
	   doc2 => 'This is the default number of attempts before show me another becomes available to students.  It can be set to -1 to disable show me another by default.',
	   type => 'number'
	 },
	 { var => 'pg{options}{showMeAnotherMaxReps}',
	   doc => 'Maximum times Show me Another can be used per problem (-1 => unlimited)',
	   doc2 => 'The Maximum number of times Show me Another can be used per problem by a student. If set to -1 then there is no limit to the number of times that Show Me Another can be used.',
	   type => 'number'
	 },
	 { var => 'pg{options}{showMeAnother}',
	   doc => 'List of options for Show Me Another button',
	   doc2 => '<ul><li><b>SMAcheckAnswers</b>: enables the Check Answers button <i>for the new problem</i> when Show Me Another is clicked</li> <li><b>SMAshowSolutions</b>: shows walk-through solution <i>for the new problem</i> when Show Me Another is clicked; a check is done first to make sure that a solution exists </li><li><b>SMAshowCorrect</b>: correct answers <i>for the new problem</i> can be viewed when Show Me Another is clicked; note that <b>SMAcheckAnswers</b> needs to be enabled at the same time</li><li><b>SMAshowHints</b>: show hints <i>for the new problem</i> (assuming they exist)</li></ul>Note: there is very little point enabling the button unless you check at least one of these options - the students would simply see a new version that they can not attempt or learn from.</p>',
	   min  => 0,
	   values => ["SMAcheckAnswers", "SMAshowSolutions","SMAshowCorrect","SMAshowHints"],
	   type => 'checkboxlist'
	 },
	 
	{	var => 'pg{options}{enablePeriodicRandomization}',
		doc => 'Enable periodic re-randomization of problems',
		doc2 => 'Enables periodic re-randomization of problems after a given number of attempts. Student would have to click Request New Version to obtain new version of the problem and to continue working on the problem',
		type => 'boolean'
	},
	{	var => 'pg{options}{periodicRandomizationPeriod}',
		doc => 'The default number of attempts between re-randomization of the problems ( 0 => never)',
		doc2 => 'The default number of attempts before the problem is re-randomized. ( 0 => never )',
		type => 'number'
	},
 	],		  
	['Permissions',
		{ var => 'permissionLevels{login}',
		  doc => 'Allowed to login to the course',
		  type => 'permission'
		},
		{ var => 'permissionLevels{change_password}',
		  doc => 'Allowed to change their password',
		  doc2 => 'Users at this level and higher are allowed to change their password. Normally guest users are not allowed to change their password.',
		  type => 'permission'
		},
		{ var => 'permissionLevels{become_student}',
		  doc => 'Allowed to <em>act as</em> another user',
		  type => 'permission'
		},
		{ var => 'permissionLevels{submit_feedback}',
		  doc => 'Can e-mail instructor',
		  doc2 => 'Only this permission level and higher get buttons for sending e-mail to the instructor.',
		  type => 'permission'
		},
		{ var => 'permissionLevels{record_answers_when_acting_as_student}',
		  doc => 'Can submit answers for a student',
		  doc2 => 'When acting as a student, this permission level and higher can submit answers for that student.',
		  type => 'permission'
		},
		{ var => 'permissionLevels{report_bugs}',
		  doc => 'Can report bugs',
		  doc2 => 'Users with at least this permission level get a link in the left panel for reporting bugs to the bug tracking system in Rochester',
		  type => 'permission'
		},
		{ var => 'permissionLevels{change_email_address}',
		  doc => 'Allowed to change their e-mail address',
		  doc2 => 'Users at this level and higher are allowed to change their e-mail address. Normally guest users are not allowed to change the e-mail address since it does not make sense to send e-mail to anonymous accounts.',
		  type => 'permission'
		},
		{ var => 'permissionLevels{view_answers}',
		  doc => 'Allowed to view past answers',
		  doc2 => 'These users and higher get the "Show Past Answers" button on the problem page.',
		  type => 'permission'
		},
		{ var => 'permissionLevels{view_unopened_sets}',
		  doc => 'Allowed to view problems in sets which are not open yet',
		  type => 'permission'
		},
		{ var => 'permissionLevels{show_correct_answers_before_answer_date}',
		  doc => 'Allowed to see the correct answers before the answer date',
		  type => 'permission'
		},
		{ var => 'permissionLevels{show_solutions_before_answer_date}',
		  doc => 'Allowed to see solutions before the answer date',
		  type => 'permission'
		},
		{ var => 'permissionLevels{can_show_old_answers}',
		  doc => 'Can show old answers',
		  doc2 => 'When viewing a problem, WeBWorK usually puts the previously submitted answer in the answer blank.  Below this level, old answers are never shown.  Typically, that is the desired behaviour for guest accounts.',
		  type => 'permission'
		},
	],
	['PG - Problem Display/Answer Checking',
		{ var => 'pg{displayModes}',
		  doc => 'List of display modes made available to students',
		  doc2 => '<p>When viewing a problem, users may choose different methods of rendering formulas via an options box in the left panel. Here, you can adjust what display modes are listed.</p><p>Some display modes require other software to be installed on the server. Be sure to check that all display modes selected here work from your server.</p><p>The display modes are <ul><li> plainText: shows the raw LaTeX srings for formulas.<li> images: produces images using the external programs LaTeX and dvipng.<li> MathJax: a successor to jsMath, uses javascript to place render mathematics.</ul></p></p>You must use at least one display mode. If you select only one, then the options box will not give a choice of modes (since there will only be one active).</p>',
		  min  => 1,
		  values => ["MathJax", "images", "plainText"],
		  type => 'checkboxlist'
		},

		{ var => 'pg{options}{displayMode}',
		  doc => 'The default display mode',
		  doc2 => 'Enter one of the allowed display mode types above.  See \'display modes entry\' for descriptions.',
		  min  => 1,
		  values => [qw(MathJax images plainText)],
		  type => 'popuplist'
		},

		{ var => 'pg{specialPGEnvironmentVars}{entryAssist}',
		  doc => 'Assist with the student answer entry process.',
		  doc2 => 'MathQuill renders students answers in real-time as they type on the keyboard. <BR><BR> MathView allows students to choose from a variety of common math structures (such as fractions and square roots) as they attempt to input their answers. <BR><BR> WIRIS provides a separate workspace for students to construct their response in a WYSIWYG environment.',
		  min  => 1,
		  values => [qw(None MathQuill MathView WIRIS)],
		  type => 'popuplist'
		},

		{ var => 'pg{options}{showEvaluatedAnswers}',
		  doc => 'Display the evaluated student answer',
		  doc2 => 'Set to true to display the "Entered" column which automatically shows the evaluated student answer, e.g. 1 if student input is sin(pi/2). If this is set to false, e.g. to save space in the response area, the student can still see their evaluated answer by hovering the mouse pointer over the typeset version of their answer.',
		  type => 'boolean'
		},		  
 		{ var => 'pg{ansEvalDefaults}{useBaseTenLog}',
		  doc => 'Use log base 10 instead of base <i>e</i>',
		  doc2 => 'Set to true for log to mean base 10 log and false for log to mean natural logarithm',
		  type => 'boolean'
		},

		{ var => 'pg{ansEvalDefaults}{useOldAnswerMacros}',
		  doc => 'Use older answer checkers',
		  doc2 => 'During summer 2005, a newer version of the answer checkers was implemented for answers which are functions and numbers.  The newer checkers allow more functions in student answers, and behave better in certain cases.  Some problems are specifically coded to use new (or old) answer checkers.  However, for the bulk of the problems, you can choose what the default will be here.  <p>Choosing <i>false</i> here means that the newer answer checkers will be used by default, and choosing <i>true</i> means that the old answer checkers will be used by default.',
		  type => 'boolean'
		  },

		{ var => 'pg{ansEvalDefaults}{numRelPercentTolDefault}',
		  doc => 'Allowed error, as a percentage, for numerical comparisons',
		  doc2 => "When numerical answers are checked, most test if the student's answer is close enough to the programmed answer be computing the error as a percentage of the correct answer.  This value controls the default for how close the student answer has to be in order to be marked correct.<p>A value such as 0.1 means 0.1 percent error is allowed.",
		  type => 'number'
		},
	],
	['E-Mail',
		{ var => 'mail{feedbackSubjectFormat}',
		  doc => 'Format for the subject line in feedback e-mails',
		  doc2 => 'When students click the <em>Email Instructor</em> button to send feedback, WeBWorK fills in the subject line.  Here you can set the subject line.  In it, you can have various bits of information filled in with the following escape sequences.<p><ul><li> %c = course ID<li> %u = user ID<li> %s = set ID<li> %p = problem ID<li> %x = section<li> %r = recitation<li> %% = literal percent sign</ul>',
		  width => 45,
		  type => 'text'
		},
		{ var => 'mail{feedbackVerbosity}',
		  doc => 'E-mail verbosity level',
		  doc2 => 'The e-mail verbosity level controls how much information is automatically added to feedback e-mails.  Levels are<ol><li value="Simple"> Simple: send only the feedback comment and context link<li value="Standard"> Standard: as in Simple, plus user, set, problem, and PG data<li value="Debug"> Debug: as in Standard, plus the problem environment (debugging data)</ol>',
		  labels=>{'0' => 'Simple',
			   '1' => 'Standard',
			   '2' => 'Debug'},
		  values => [qw(0 1 2)],
		  type => 'popuplist'

		},
		{ var => 'mail{allowedRecipients}',
		  doc => 'E-mail addresses which can receive e-mail from a pg problem',
		  doc2 => 'List of e-mail addresses to which e-mail can be sent by a problem. Professors need to be added to this list if questionaires are used, or other WeBWorK problems which send e-mail as part of their answer mechanism.',
		  type => 'list'
		},
		{ var => 'permissionLevels{receive_feedback}',
		  doc => 'E-mail feedback from students automatically sent to this permission level and higher:',
		  doc2 => 'Users with this permssion level or greater will automatically be sent feedback from students (generated when they use the "Contact instructor" button on any problem page).  In addition the feedback message will be sent to addresses listed below.  To send ONLY to addresses listed below set permission level to "nobody".',
		  type => 'permission'
		},
		{ var => 'mail{feedbackRecipients}',
		  doc => 'Additional addresses for receiving feedback e-mail.',
		  doc2 => 'By default, feeback is sent to all users above who have permission to receive feedback. Feedback is also sent to any addresses specified in this blank. Separate email address entries by commas.',
		  type => 'list'
		},
		{ var => 'feedback_by_section',
		  doc => 'Feedback by Section.',
		  doc2 => 'By default, feeback is always sent to all users specified to recieve feedback.  This variable sets the system to only email feedback to users who have the same section as the user initiating the feedback.  I.E.  Feedback will only be sent to section leaders.',
		  type => 'boolean'
		},

	],
#  PGSimple is not used for now GG
#	['Editor',
#		{ var => 'editor{author}',
#		  doc => 'Default name of the problem author',
#		  doc2 => 'In the PGSimpleEditor, this will automatically fill the problem Author field.',
#		  width => 45,
#		  type => 'text'
#		},
#		{ var => 'editor{authorInstitute}',
#		  doc => 'Institute of the problem author',
#		  doc2 => 'In the PGSimpleEditor, this will automatically fill the institute field of the problem author',
#		  width => 45,
#		  type => 'text'
#		 },
#		{ var => 'editor{textTitle}',
#		  doc => 'Text Title of the problems',
#		  doc2 => 'In the PGSimpleEditor, this will automatically fill the text title field',
#		  width => 45,
#		  type => 'text'
#		},
#		{ var => 'editor{textEdition}',
#		  doc => 'Text Edition of the problems',
#		  doc2 => 'In the PGSimpleEditor, this will automatically fill the text edition field',
#		  width => 45,
#		  type => 'text'
#		},
#		{ var => 'editor{textAuthor}',
#		  doc => 'Text Author of the problems',
#		  doc2 => 'In the PGSimpleEditor, this will automatically fill the text author field',
#		  width => 45,
#		  type => 'text'
#		}]	
];




################################################################################
# Site wide overrides are entered into the file localOverrides.conf
################################################################################


include("conf/localOverrides.conf");

1; #final line of the file to reassure perl that it was read properly.
